package com.example.campus_order_sb.service;

import com.example.campus_order_sb.entity.Category;
import com.example.campus_order_sb.entity.Food;
import com.example.campus_order_sb.repository.CategoryRepository;
import com.example.campus_order_sb.repository.FoodRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class MenuService {

    @Autowired
    private CategoryRepository categoryRepository;

    @Autowired
    private FoodRepository foodRepository;

    public List<Category> getAllCategories() {
        return categoryRepository.findAll();
    }

    public List<Food> getAllFoods() {
        return foodRepository.findAll();
    }
}